<!--
 * @Author: 余铖
 * @Date: 2020-04-02 08:15:00
 * @LastEditors: 余铖
 * @LastEditTime: 2020-04-02 11:32:15
 * @Description: 请输入文件说明
 -->
<!--  -->
<template>
	<div class=''>
		<div class="title"><h1>{{$route.params.examName}}</h1></div>
        <div class="list" v-for="(item,i) in Lists" :key="i">
            <div class="mainList">
                <div class="title2"><h2>{{item.sort}}. {{item.stem}}</h2></div>
                <div class="renderSelect">
                    <div v-if="item.opA"><input :name="i" type="radio"> A: {{item.opA}}</div>
                    <div v-if="item.opB"><input :name="i" type="radio"> B: {{item.opB}}</div>
                    <div v-if="item.opC"><input :name="i" type="radio"> C: {{item.opC}}</div>
                    <div v-if="item.opD"><input :name="i" type="radio"> D: {{item.opD}}</div>
                    <div v-if="item.opE"><input :name="i" type="radio"> E: {{item.opE}}</div>
                    <div v-if="item.opF"><input :name="i" type="radio"> F: {{item.opF}}</div>
                    
                    <div v-if="item.wgA"><input :name="i" type="radio"> A: {{item.wgA}}</div>
                    <div v-if="item.wgB"><input :name="i" type="radio"> B: {{item.wgB}}</div>
                    <div v-if="item.wgC"><input :name="i" type="radio"> C: {{item.wgC}}</div>
                    <div v-if="item.wgD"><input :name="i" type="radio"> D: {{item.wgD}}</div>
                    <div v-if="item.wgE"><input :name="i" type="radio"> E: {{item.wgE}}</div>
                    <div v-if="item.wgF"><input :name="i" type="radio"> F: {{item.wgF}}</div>
                </div>
            </div>
        </div>
	</div>
</template>

<script>
import { requestData } from "@/api/personal.js";
export default {
	data() {
		//这里存放数据
		return {
            Lists: []
        };
	},
    methods: {},
    created() {
        requestData({
            formData: { quesFilter: {
                examType: this.$route.params.examType,
                questionnaireId: this.$route.params.questionnaireId
            }},
            url: "/exam/User/getExamPaper"
        })
        .then(result => {
            
            if (result.data.code === "200") {
                this.Lists = result.data.results.data;
                console.log(this.Lists);
            } else {
                this.$Message.error("失败");
            }
            
        })
        .catch(err => {
            console.log(err);
        });
    },
	mounted() {
        
    }
};
</script>
<style lang="less" scoped>
    .title {
        text-align: center;
        margin-bottom: 15px;
    }
    .list {
        width: 100%;
        height: 100px;
        border-bottom: 1px solid rgba(190, 190, 190, 0.596);
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;

        .mainList {
            width: 80%;
            height: 80px;

            .title2{
                height: 30px;
            }
            .renderSelect {
                margin-top: 15px;
                height: 30px;
                display: flex;
                justify-content: start;
                padding-left: 150px;
                
                &>div {
                    margin-left: 35px;
                }
            }
        }
    }
</style>